package cn.gz.sboot31.mapper;

import cn.gz.sboot31.entity.User;
import org.apache.ibatis.annotations.Insert;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Select;

@Mapper
public interface UserMapper {

    @Select("select password from jt_user where username=#{username}")
    String selectByUsername(String username);

    @Insert("insert into jt_user (username,password,nickname,age) values(#{username},#{password},#{nickname},#{age})")
    void insert(User user);

}
